// 小程序端 和 后台管理端路由映射
export const whiteList = ['/pages/login/login', '/pages/my/my', '/pages/guanwang/guanwang']
export const page404 = []
const urlMaps = [
    {
        web: {
            url: '/user/login'
        },
        uni: {
            url: '/pages/login/login'
        }
    },
    {
        web: {
            url: '/dashboard/analysis'
        },
        uni: {
            url: '/pages/home/home'
        }
    },
    {
        web: {
            url: '/paishui/townList'
        },
        uni: {
            url: '/pages/survey/survey'
        }
    },
    {
        web: {
            url: '/paishui/TownList/Detail'
        },
        uni: {
            url: '/pages/house/house'
        }
    },
    {
        web: {
            url: '/paishui/HouseList/Detail'
        },
        uni: {
            url: '/pages/houseInfo/houseInfo'
        }
    }
]
export function urlMapping(type, url) {
    if (type === 'web') {
        return ((urlMaps.find(x => x.web.url === url) || {}).uni || {}).url || null
    } else if (type === 'uni') {
        return ((urlMaps.find(x => x.uni.url === url) || {}).web || {}).url || null
    }
    return
}
